﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data;
using BlueDot.Data.Core;
using Microsoft.Synchronization.Data;
using Syncronization;

namespace SmartDevice.Syncronization.UnitTests.Mocks
{
    public class MockSyncProvider : ServerSyncProvider, IServerSyncProvider
    {
        #region Constructors

        public MockSyncProvider()
        {
            SchemaBuilders = new List<ISchemaBuilder>();
        }

        #endregion

        #region Properties

        public SyncSchema FullSyncSchema { get; set; }


        public List<ISchemaBuilder> SchemaBuilders { get; set; }

        #endregion

        #region IServerSyncProvider Members

        public Uri BaseURI
        {
            get { throw new NotImplementedException(); }
            set { throw new NotImplementedException(); }
        }

        public string GetChangesWebMethod
        {
            get { throw new NotImplementedException(); }
            set { throw new NotImplementedException(); }
        }

        public void AddSchema(ISchemaBuilder schemaBuilder)
        {
            SchemaBuilders.Add(schemaBuilder);
        }

        public override SyncContext ApplyChanges(SyncGroupMetadata groupMetadata, DataSet dataSet,
                                                 SyncSession syncSession)
        {
            return new SyncContext();
        }

        public override SyncContext GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)
        {
            return new SyncContext();
        }

        public override SyncSchema GetSchema(Collection<string> tableNames, SyncSession syncSession)
        {
            return new SyncSchema();
        }

        #endregion
    }
}